﻿//-----------------------------------------------------------------------
// <copyright file="Copyright.cs" author="Michael Herndon">
//     Copyright (c) Company.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Amplify.CodeDom
{
	using System;
	using System.CodeDom;
	using System.Collections.Generic;
	using System.Linq;
	using System.Text;

	public static partial class Mixin
	{

		public static CodeConditionStatement Then(this CodeConditionStatement unit, IEnumerable<CodeStatement> statements)
		{
			unit.TrueStatements.AddRange(statements.ToArray());
			return unit;
		}

		public static CodeConditionStatement Else(this CodeConditionStatement unit, IEnumerable<CodeStatement> statements)
		{
			unit.FalseStatements.AddRange(statements.ToArray());
			return unit;
		}
	}

	

	public class If : CodeConditionStatement
	{
		public If():base() { }

		public If(CodeExpression condition):base() {
			this.Condition = condition;
		}
	}
}
